
#define RCC_MC_AHB4ENCLRR *((volatile unsigned int *)0x50000A28)
#define GPIOE_MODER *((volatile unsigned int *)0x50006000)
#define GPIOE_OTYPER *((volatile unsigned int *)0x50006004)
#define GPIOE_OSPEEDR *((volatile unsigned int *)0x50006008)
#define GPIOE_PUPDR *((volatile unsigned int *)0x5000600C)
#define GPIOE_ODR *((volatile unsigned int *)0x50006014)

void Led_Blink(void)
{
    // 使能GPIOE模块的时钟
    RCC_MC_AHB4ENCLRR |= (0x1 << 4);
    // PE10配置为输出模式
    GPIOE_MODER &= ~(0X3 << 20);
    // PE10配置为推挽输出
    GPIOE_OTYPER &= ~(0x1 << 10);
    // PE10配置为低速
    GPIOE_OSPEEDR &= ~(0x3 << 20);
    // PE10配置为断开上下拉电阻
    GPIOE_PUPDR &= ~(0x3 << 20);
    while(1)
    {
        // PE10输出高电平
        GPIOE_ODR |= (0x1 << 10);
        // 延时
        for (volatile int i = 0; i < 100000; i++);
        //PE10输出低电平
        GPIOE_ODR &= ~(0x1 << 10);
        // 延时
        for (volatile int i = 0; i < 100000; i++);      
    }
}
